﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Navigant.Infrastructure.Cases;
using Navigant.Infrastructure.RepositoryFramework;

namespace Navigant.UnitTests.RepositoryFramework
{
    [TestClass()]
    public class CaseRepositoryFactoryTest
    {
        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return this.testContextInstance;
            }
            set
            {
                this.testContextInstance = value;
            }
        }

        [TestMethod()]
        public void GetCaseRepositoryTest()
        {
            ICaseRepository repository = CaseRepositoryFactory.GetCaseRepository();
            Assert.AreNotEqual(null, repository);
            Assert.AreEqual("SharePointCaseRepository", repository.GetType().Name);
            this.testContextInstance.WriteLine("Created an ICaseRepository of type {0}", repository.GetType().FullName);
        }
    }
}
